import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common'
import { ApiOperation, ApiProperty, ApiTags } from '@nestjs/swagger'


@Controller()
@ApiTags('用户板块')
export class UserController {
    // 获取
    @Get('user')
    @ApiOperation({ summary: '获取单个用户' })
    async getUser() {
        return 'hello'
    }

    // 获取
    @Get('users')
    @ApiOperation({ summary: '获取所有用户列表' })
    async getUsers() {
        return 'hello'
    }

    // 删除
    @Post('users/delete/:id')
    @ApiOperation({ summary: '删除用户' })
    async remove() {
        return 'hello'
    }

    // 新增
    @Post('users/create')
    @ApiOperation({ summary: '创建用户' })
    async create(@Body() body: any) {
        return 'hello'
    }

    // 更新
    @Post('users/update')
    @ApiOperation({ summary: '更新用户信息' })
    async update(@Body() body: any) {
        return 'hello'
    }
}